<%--
    author:xuzm
    date:20180419
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<link type="text/css" rel="stylesheet" href="css/drawing/drawingTransfer.css"/>
<link type="text/css" rel="stylesheet" href="css/common/common.css"/>
<!-- Main view -->
<div class="animated fadeInRight">
    <div class="wrapper wrapper-content ng-scope">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>{{ 'TRANSFER_QUERY' | translate }}</h5>
                    </div>
                    <div class="ibox-content sk-loading" ng-controller="transferInfoCtrl">
                        <div class="sk-spinner sk-spinner-wave">
                            <div class="sk-rect1"></div>
                            <div class="sk-rect2"></div>
                            <div class="sk-rect3"></div>
                            <div class="sk-rect4"></div>
                            <div class="sk-rect5"></div>
                        </div>

                        <form id="drawingTransferForm" name="myform">
                           <div class="container">
                            <div class="row">
                                <div class="col-sm-6 col-md-6 col-lg-3">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">商户号：</span>
                                            <div uib-tooltip="可通过商户名称搜索商户号"
                                                 angucomplete-alt id="refId"
                                                 input-name="refId"
                                                 maxlength="10"
                                                 pause="100"
                                                 auto-match="true"
                                                 selected-object="selectedMerchant"
                                                 local-data="merchants"
                                                 search-fields="id,name"
                                                 title-field="id"
                                                 description-field="name"
                                                 minlength="0"
                                                 focus-first="true"
                                                 input-class="form-control form-control-small"
                                                 match-class="highlight">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6 col-md-6 col-lg-3">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">申请人：</span>
                                            <input type="text" id="applicant" class="form-control" ng-model="searchInfo.applicant" >
                                        </div>
                                    </div>
                                </div>  
                                <div class="col-sm-6 col-md-6 col-lg-3">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">划款人：</span>
                                            <input type="text" id="transfer" class="form-control" ng-model="searchInfo.transfer">
                                        </div>
                                    </div>
                                </div>
                                 <div class="col-sm-6 col-md-6 col-lg-3">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">状态：</span>
                                            <select id="status" class="form-control" ng-model="searchInfo.status">
                                                <option value=""></option>
                                                <option value="5">待复核</option>
                                                <option value="2">待划款</option>
                                                <option value="3">已划款</option>
                                                <option value="4">自动扣款</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                </div>
                                <div class="row">
                                <div class="col-sm-6 col-md-6 col-lg-3">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">申请起始日期：</span>
                                            <input type="text" id="minApplicationTime" name="minApplicationTime"
                                                   uib-tooltip="可只选择申请起始日期查询起始日期至今数据"
                                                   class="form-control" ng-readonly="true" ng-click="openDatepicker1()"
                                                   uib-datepicker-popup="{{format}}" ng-model="searchInfo.minApplicationTime"
                                                   is-open="popup1.opend"
                                                   datepicker-options="dateOptions1"
                                                   close-text="关闭" alt-input-formats="altInputFormats"
                                                   close-text="关闭" clear-text="清空" current-text="今天">
                                            <span class="input-group-btn">
                                            <button type="button" class="btn btn-default btn-sm no-margins"
                                                    ng-click="openDatepicker1()">
                                                <i class="fa fa-calendar"></i>
                                            </button>
                                        </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6 col-md-6 col-lg-3">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">申请结束日期：</span>
                                            <input type="text" id="maxApplicationTime" name="maxApplicationTime"
                                                   class="form-control" ng-readonly="true" ng-click="openDatepicker2()"
                                                   uib-datepicker-popup="{{format}}" ng-model="searchInfo.maxApplicationTime"
                                                   is-open="popup2.opend"
                                                   datepicker-options="dateOptions2"
                                                   close-text="关闭" alt-input-formats="altInputFormats"
                                                   ng-disabled="maxApplicationTimeDisable"
                                                   close-text="关闭" clear-text="清空" current-text="今天">
                                            <span class="input-group-btn">
                                            <button type="button" class="btn btn-default btn-sm no-margins"
                                                    ng-click="openDatepicker2()"
                                                    ng-disabled="maxApplicationTimeDisable">
                                                <i class="fa fa-calendar"></i>
                                            </button>
                                        </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6 col-md-6 col-lg-3">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">划款起始日期：</span>
                                            <input type="text" id="minTransferTime" name="minTransferTime"
                                                   uib-tooltip="可只选择划款起始日期查询起始日期至今数据"
                                                   class="form-control" ng-readonly="true" ng-click="openDatepicker3()"
                                                   uib-datepicker-popup="{{format}}" ng-model="searchInfo.minTransferTime"
                                                   is-open="popup3.opend"
                                                   datepicker-options="dateOptions3"
                                                   close-text="Close" alt-input-formats="altInputFormats"
                                                   close-text="关闭" clear-text="清空" current-text="今天">
                                            <span class="input-group-btn">
                                            <button type="button" class="btn btn-default btn-sm no-margins"
                                                    ng-click="openDatepicker3()">
                                                <i class="fa fa-calendar"></i>
                                            </button>
                                        </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6 col-md-6 col-lg-3">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">划款结束日期：</span>
                                            <input type="text" id="maxTransferTime" name="maxTransferTime"
                                                   class="form-control" ng-readonly="true" ng-click="openDatepicker4()"
                                                   uib-datepicker-popup="{{format}}" ng-model="searchInfo.auditEndDate"
                                                   is-open="popup4.opend"
                                                   datepicker-options="dateOptions4"
                                                   close-text="Close" alt-input-formats="altInputFormats"
                                                   ng-disabled="maxTransferTimeDisable"
                                                   close-text="关闭" clear-text="清空" current-text="今天">
                                            <span class="input-group-btn">
                                            <button type="button" class="btn btn-default btn-sm no-margins"
                                                    ng-click="openDatepicker4()"
                                                    ng-disabled="maxTransferTimeDisable">
                                                <i class="fa fa-calendar"></i>
                                            </button>
                                        </span>
                                        </div>
                                    </div>
                                </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-6 col-md-6 col-lg-3 col-lg-offset-3">
                                    <button type="submit" class="btn btn-sm btn-w-m btn-primary pull-right"
                                            ng-click="search()">
                                        查询
                                    </button>
                                </div>
                                <div class="col-sm-6 col-md-6 col-lg-3">
                                    <button type="button" class="btn btn-sm btn-w-m btn-info general-btn"
                                            ng-click="resetForm()">
                                            
                                                                                                                                                重置
                                                                                                                                                
                                    </button>
                                </div>
                                <div class="pull-right col-sm-6 col-md-6 col-lg-3">
                                    <button type="button" class="pull-right btn btn-sm btn-sm btn-success export-btn"
                                            ng-click="export()">
                                        <i class="fa fa-download"></i>&nbsp;导出数据
                                    </button>
                                </div>
                            </div>
                        </form>
                        <div class="hr-line-dashed"></div>
                        <%-- ng_table --%>
                        <div class="table-responsive">
                            <table ng-table="transferTable"
                                   class="table drawingTransfertable table-condensed table-striped table-hover table-bordered">
                                <tr ng-repeat="row in $data">
                                    <td class="text-center" data-title="'提现流水号'">
										{{row.id}}
                                    </td>
                                    <td class="text-center" data-title="'商户号'">
                                        {{row.refId}}
                                    </td>
                                    <td class="text-center" data-title="'商户名称'">
                                        {{row.merName}}
                                    </td>
                                    <td class="text-center" data-title="'提现金额'">
                                        {{row.amount | currency:row.currency}}
                                    </td>
                                    <td class="text-center" data-title="'划款金额'">
                                         {{row.transferAmount | currency:row.currency}}
                                    </td>
                                    <td class="text-center"  data-title="'实际划款金额'">
                                        {{row.realAmount | currency:row.currency}}
                                    </td>
                                    <td class="text-center" data-title="'申请人'">
                                        {{row.applicant}}
                                    </td>
                                    <td class="text-center" data-title="'申请时间'">
                                       {{row.applicationTime | date:'yyyy/MM/dd hh:mm'}}
                                    </td>
                                    <td class="text-center" data-title="'审核人'">
                                        {{row.auditor}}
                                    </td>
                                    <td class="text-center" data-title="'审核时间'">
                                        {{row.auditTime | date:'yyyy/MM/dd hh:mm'}}
                                    </td>
                                    <td class="text-center" data-title="'划款人'">
                                       {{row.transfer}}
                                    </td>
                                    <td class="text-center" data-title="'划款时间'">
                                       {{row.transferTime | date:'yyyy/MM/dd hh:mm'}}
                                    </td>
                                    <td class="text-center" data-title="'状态'">
                                        {{row.status | enumParamsFilter:[{2:"划款",3:"已划款",4:"自动扣款"}]}}
                                    </td>
                                    <td class="text-center"  data-title="'备注'">
                                       {{row.remark}}
                                    </td>
                                    <td class="text-center"  data-title="'复核描述'">
                                        {{row.reviewRemark}}
                                    </td>
                                    <td class="text-center"  data-title="'划款描述'">
                                        {{row.transferRemark}}
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <my-pagination table-param="transferTable"></my-pagination>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>